/**
 * Copyright (c) 2020 lizebang
 *
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

package cmd

import (
	"fmt"
	"os"

	"gitee.com/banggua/ggtsync/logger"
)

const (
	execname = "ggtsync"
	major    = 0
	minor    = 1
	patch    = 0
)

func version() string {
	return fmt.Sprintf(`%s version: %s/%d.%d.%d
`, execname, execname, major, minor, patch)
}

func Version() {
	logger.Infof("%s", version())
	os.Exit(0)
}
